package com.marisfrolg.entity;

import java.util.Hashtable;
import java.util.List;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class BinActualInfo implements KvmSerializable {
	public String BIN;

	public List<BinActualItemInfo> ITEMS;

	public String USERNAME;

	@Override
	public Object getProperty(int arg0) {
		switch (arg0) {
		case 0:
			return BIN;
		case 1:
			return ITEMS;
		case 2:
			return USERNAME;
		default:
			break;
		}
		return null;
	}

	@Override
	public int getPropertyCount() {
		return 3;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {
		switch (arg0) {
		case 0:
			arg2.type = PropertyInfo.STRING_CLASS;
			arg2.name = "BIN";
			break;
		case 1:
			arg2.type = PropertyInfo.OBJECT_CLASS;
			arg2.name = "ITEMS";
			break;
		case 2:
			arg2.type = PropertyInfo.STRING_CLASS;
			arg2.name = "USERNAME";
			break;
		default:
			break;
		}
	}

	@SuppressWarnings("unchecked")
	@Override
	public void setProperty(int arg0, Object arg1) {
		switch (arg0) {
		case 0:
			BIN = arg1.toString();
			break;
		case 1:
			ITEMS = (List<BinActualItemInfo>)arg1;
			break;
		case 2:
			USERNAME = arg1.toString();
			break;
		default:
			break;
		}

	}


}